#include<iostream> 
void Stringoutput(int start,int end,char *s)
	{
		for(int i=end-1;i>=start;i--)
		{
			printf("%c",s[i]);
		}
		printf("\n");
	}
int main()
{
	
	int start=0;
	int i=0;
	char s[100]="I like.....,,C++ programming!";
	while(s[i]!='\0')
	{
		                                                                                                                           
		if(s[i]==' '||s[i]==','||s[i]=='.'||s[i]=='?'||s[i]=='!')
		{
			if(start<i){
				Stringoutput(start,i,s);
			}
			start=i+1;
			if(s[start]==' '||s[start]==','||s[start]=='.'||s[start]=='?'||s[start]=='!')
			start++;                                                                                                                                                                                  
	   }
		i++;
	}
	return 0;
 } 
